
			Version Control


											  created: 97-03-03 11.44.50
										  last update: 9/22/01 {7:59:05 PM}

Author:	Vince Darley
E-mail:	<vince@santafe.edu>
  mail:	317 Paseo de Peralta, Santa Fe, NM 87501, USA
   www:	<http://www.santafe.edu/~vince/>


	  	 Introduction

The core AlphaTcl library now incorporates the rudiments of a general
version control package.  The goal of this is to allow you to open,
check out, check in, diff, merge,...  files within Alpha.  The version
control support is designed to allow you to use many different version
control packages (cvs, voodoo, perforce, etc) at the same time (a
particular version control package is associated with a given set of
files, so any one file must of course only be under one kind of version
control).

In Alpha 8 or Alphatk, each window has a version control popup-menu,
towards the top right corner, above the marks menu.  In Alpha 7 you
have to activate the 'Version Control Menu' package which gives you
a menu in the main menubar from which to access these functions.

Packages are provided to plug in to the general vc system.  Currently 
four such packages are available: vcPerforce, vcCvs, vcVoodoo and 
vcLocal.  This last package is basically a means to keep two file
trees, a 'repository' and a working-tree.  Files are edited in the
working tree, and checked in/out of the repository tree.

	  	 VC setup

The VC code needs to know what version control system to use for
a given file.  The way you do this in Alpha is via filesets.  Each
fileset you define can have various additional pieces of information
attached to it.  One of these, provided you have activated the 'Vcs'
feature, is the version control system.  After activating the Vcs
feature, simply go to the 'Edit Filesets' dialog and you will notice
that each fileset has an associated popup menu from which you can
select Cvs, Perforce, Voodoo etc.

If you don't already have a fileset which includes the files you want 
to use a version control system on, you need to create one.  If you'd 
like the files to be in the Fileset Menu, you probably should use a
'From Hierarchy' or 'From Directory' fileset.  If you'd simply like
Alpha to know about the fileset ('behind the scenes', as it were),
then a 'Recurse In' fileset is probably best.  See "Filesets Help" for
more information.

Once you have a fileset associated with a given file, Alpha
automatically places relevant version control actions in the popup
menu in each window (for Alpha 7.x, this popup does not exist.  In
this case you have to use the less sophisticated global Version
Control Menu).

	  	 VC operations

Currently you may carry out any of the following operations:

    add 
    checkIn 
    undoCheckout 
    makeWritable 
    checkOut
    refetchReadOnly 
    fetchReadOnly
    showDifferences
    
Although some may not be 100% implemented yet.  The specific items in
the menu will usually reflect the terminology used by the VCS tool.
    
to be continued...

	  	 VC state

On the Mac, the version-control state of a file may be indicated by a
'ckid' resource.  This resource is added by the VCS tool and contains
information about the check-out status of the file.  If you wish Alpha
to respect this resource (you should!), select 
"Config --> Preferences --> Files --> Projector Aware" or 
"Version-Control Aware" in the "File --> Open" dialog 
[note: this terminology should be made consistent].

Alpha 8 will warn you if this 'ckid' resource is inconsistent with your
selected VCS system.  There are very few reasons why you should wish to
track a single file with more than one VCS tool. 

The 'ckid' resource can indicate three basic states of the file:
"Writable", "Read-Only", and "MRO" ("Modify-Read-Only").  These states
are reflected in the VCS popup by a pencil, a pencil with a line
through it, and a pencil with a dashed line through it, respectively. 
In addition to these states, Alpha verifies that a file is writable
when it opens it.  A file might not be writable because it is already
opened by another application or because it was opened from the Help
menu.  In this event, even if the 'ckid' resource indicates that the
file is writable or MRO, Alpha will mark the VCS popup with a locked
icon, to indicate that the read-only state is caused by something
other than version control.  You can use the VCS popup to unlock the
file, allowing changes, but you will still probably not be able to
save changes until the external conflict is resolved.

	  	 VC limitations

Most of the current plug-ins cannot be used to setup a particular
version control system; they rely on a pre-existing configuration
(for the vc server, password, etc).  Hence you will probably have to
use a cvs client, perforce client etc to configure the system before
Alpha will be able to use it effectively.

